﻿<SwapChainBackgroundPanel
    x:Class="journal.page"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:journal"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">
        <Page x:Name="_TopPage" Background="#DDDDDD">
        <Canvas x:Name="_TopCanvas" >
            <Grid x:Name="Line1Grid" Canvas.ZIndex="2"  Width="{Binding ElementName=_TopCanvas, Path=ActualWidth}">
                <TextBlock x:Name="Line1Text" Margin="0,5,5,0" HorizontalAlignment="right" FontSize="18" Foreground="White"></TextBlock>
            </Grid>
            <Grid x:Name="Line1ShadowGrid" Canvas.ZIndex="-1" Canvas.Left="1" Canvas.Top="1" Width="{Binding ElementName=_TopCanvas, Path=ActualWidth}">
                <TextBlock x:Name="Line1ShadowText" Margin="0,5,5,0" FontSize="18" HorizontalAlignment="right" Foreground="Black"></TextBlock>
            </Grid>
            <Button x:Name="TouchInputModeOn" Canvas.Left="5" Canvas.Top="5" Style="{StaticResource AppBarButtonStyle}"  Click="clickTouchInputModeOn">
                <Image x:Name="TouchInputModeOnImage" Height="25" Source="../../res/controls/icon_finger_mode_on.png"/>
            </Button>
            <Button x:Name="TouchInputModeOff" Canvas.Left="5" Canvas.Top="5" Style="{StaticResource AppBarButtonStyle}" Click="clickTouchInputModeOff" Visibility="Collapsed">
                <Image x:Name="TouchInputModeOffImage" Height="25" Source="../../res/controls/icon_finger_mode_off.png"/>
            </Button>
            <!-- settings flyouts-->
            <Popup x:Name="SettingsColorFlyout" IsLightDismissEnabled="True" IsOpen="False">
                <Popup.ChildTransitions>
                    <TransitionCollection>
                        <EdgeUIThemeTransition Edge="Right"/>
                    </TransitionCollection>
                </Popup.ChildTransitions>
                <Grid x:Name="SettingsColorDialogGrid" Background="#AA000000" Width="300" Height="0" Canvas.Top="0" Canvas.Left="100">
                    <Grid HorizontalAlignment="Left" Height="500" Margin="0,0,0,0" VerticalAlignment="Top" Width="300">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="100*"/>
                            <ColumnDefinition Width="200*"/>
                        </Grid.ColumnDefinitions>
                        <TextBlock HorizontalAlignment="Left" Height="38" Margin="11,93,0,0" TextWrapping="Wrap" Text="Red" VerticalAlignment="Top" Width="57" FontFamily="Segoe UI" FontSize="18" TextAlignment="Right"/>
                        <TextBlock HorizontalAlignment="Left" Height="38" Margin="11,149,0,0" TextWrapping="Wrap" Text="Green" VerticalAlignment="Top" Width="57" FontFamily="Segoe UI" FontSize="18" TextAlignment="Right"/>
                        <TextBlock HorizontalAlignment="Left" Height="38" Margin="11,206,0,0" TextWrapping="Wrap" Text="Blue" VerticalAlignment="Top" Width="57" FontFamily="Segoe UI" FontSize="18" TextAlignment="Right"/>
                        <Slider x:Name="SettingsColorRed" HorizontalAlignment="Left"  Grid.Column="1" Margin="1,93,0,0" VerticalAlignment="Top" Width="130" Maximum="255" ValueChanged="updateSettingsColor"/>
                        <Slider x:Name="SettingsColorGreen" HorizontalAlignment="Left"  Grid.Column="1" Margin="1,149,0,0" VerticalAlignment="Top" Width="130" Maximum="255" ValueChanged="updateSettingsColor"/>
                        <Slider x:Name="SettingsColorBlue" HorizontalAlignment="Left"  Grid.Column="1" Margin="1,206,0,0" VerticalAlignment="Top" Width="130" Maximum="255" ValueChanged="updateSettingsColor"/>
                        <TextBlock Foreground="#FFF0F0F0" HorizontalAlignment="Left" Height="38" Margin="20,15,0,0" TextWrapping="Wrap" Text="Background Color" VerticalAlignment="Top" Width="366" FontFamily="Segoe UI" FontSize="20" Grid.ColumnSpan="2"/>
                    </Grid>
                    <CheckBox x:Name="SettingsInputModeToggle" Content="Show input mode switch" Checked="settingsInputModeChecked" Unchecked="settingsInputModeChecked" HorizontalAlignment="Left" Margin="20,300,0,0" FontFamily="Segoe UI" FontSize="18" VerticalAlignment="Top"/>
                </Grid>
            </Popup>
            <Popup x:Name="SettingsAboutFlyout" IsLightDismissEnabled="True" IsOpen="False">
                <Popup.ChildTransitions>
                    <TransitionCollection>
                        <EdgeUIThemeTransition Edge="Right"/>
                    </TransitionCollection>
                </Popup.ChildTransitions>
                <Grid x:Name="SettingsAboutDialogGrid" Background="#AA000000" Width="300" Height="500" Canvas.Top="0" Canvas.Left="100">
                    <Grid HorizontalAlignment="Left" Height="500" Margin="0,0,0,0" VerticalAlignment="Top" Width="300">
                        <TextBlock Foreground="#FFF0F0F0" HorizontalAlignment="Left" Height="38" Margin="20,15,0,0" TextWrapping="Wrap" Text="About" VerticalAlignment="Top" Width="366" FontFamily="Segoe UI" FontSize="20"/>
                        <TextBlock Foreground="#FFF0F0F0" HorizontalAlignment="Left" Height="200" Margin="20,80,0,0" TextWrapping="Wrap" Text="For more information on Austin, to give us feedback, or to report bugs please email us at austin@microsoft.com or visit the link below." VerticalAlignment="Top" Width="250" FontFamily="Segoe UI" FontSize="20"/>
                        <HyperlinkButton HorizontalAlignment="Left" Height="100" Margin="20,270,0,0" Content="Visit our blog" NavigateUri="https://microsoft-my.sharepoint.com/personal/jorgeper_microsoft_com/austinblog" VerticalAlignment="Top" Width="250" FontFamily="Segoe UI" FontSize="20"/>
                    </Grid>
                </Grid>
            </Popup>            
            <!-- other flyouts -->
            <Popup x:Name="DialogFlyout" IsLightDismissEnabled="True" IsOpen="False">
                <Popup.ChildTransitions>
                    <TransitionCollection>
                        <EdgeUIThemeTransition />
                    </TransitionCollection>
                </Popup.ChildTransitions>
                <Grid x:Name="DialogGrid"  Background="#DD7E7E7E" Width="0" Height="100" Canvas.Top="100" Canvas.Left="0">
                    <TextBlock x:Name="DialogMessage" VerticalAlignment="center" HorizontalAlignment="center" Foreground="white" FontFamily="Segoe UI" FontSize="20"></TextBlock>
                </Grid>
            </Popup>
            
            <!--................. zoom flyout ................. -->
            <Popup x:Name="ZoomFlyout" IsLightDismissEnabled="False" IsOpen="False">
                <Popup.ChildTransitions>
                    <TransitionCollection>
                        <PopupThemeTransition />
                    </TransitionCollection>
                </Popup.ChildTransitions>
                <Grid Background="Black" Margin="0,0,0,0" Width="100" Height="370">
                    <Button x:Name="ZoomGrid" Style="{StaticResource AppBarButtonStyle}"  Margin="0,10,0,0" AutomationProperties.Name="All pages" Click="clickZoomGrid">
                        <Image x:Name="ZoomGridImage" Height="24" Source="../../res/controls/icon_zoom_grid.png"/>
                    </Button>
                    <Button x:Name="ZoomFullPage" Style="{StaticResource AppBarButtonStyle}"  Margin="0,100,0,0" AutomationProperties.Name="Full page" Click="clickZoomFullPage">
                        <Image x:Name="ZoomFullPageImage" Height="25" Source="../../res/controls/icon_zoom_full.png"/>
                    </Button>
                    <Button x:Name="ZoomFitToWidth" Style="{StaticResource AppBarButtonStyle}"  Margin="0,190,0,0" AutomationProperties.Name="Zoom" Click="clickZoomFitToWidth">
                        <Image x:Name="ZoomFitToWidthImage" Height="25" Source="../../res/controls/icon_zoom_fit.png"/>
                    </Button>
                    <Button x:Name="ZoomExpandStack" Style="{StaticResource AppBarButtonStyle}"  Margin="0,280,0,0" AutomationProperties.Name="Expand stack" Click="clickZoomExpandStack">
                        <Image x:Name="ZoomExpandStackImage" Height="25" Source="../../res/controls/icon_expand.png"/>
                    </Button>
                    <Image Visibility="Collapsed" x:Name="ZoomExpandStackImageDisabled" Height="25" Source="../../res/controls/icon_expand_disabled.png"/>
                    <Image Visibility="Collapsed" x:Name="ZoomExpandStackImageEnabled" Height="25" Source="../../res/controls/icon_expand.png"/>
                </Grid>
            </Popup>
            <!--................. tool flyout ................. -->
            <Popup x:Name="PenTypeFlyout" IsLightDismissEnabled="False" IsOpen="False">
                <Popup.ChildTransitions>
                    <TransitionCollection>
                        <PopupThemeTransition />
                    </TransitionCollection>
                </Popup.ChildTransitions>
                <Grid Background="Black" Margin="0,0,0,0" Width="100" Height="290">
                    <Button x:Name="BallpointPen" Style="{StaticResource AppBarButtonStyle}"  Margin="0,10,0,0" AutomationProperties.Name="Pen" Click="clickBallpointPen">
                        <Image x:Name="BallpointPenImage" Height="25" Source="../../res/controls/icon_tool_pen.png"/>
                    </Button>
                    <Button x:Name="Eraser" Style="{StaticResource AppBarButtonStyle}"  Margin="0,100,0,0" AutomationProperties.Name="Eraser" Click="clickEraser">
                        <Image x:Name="EraserImage" Height="25" Source="../../res/controls/icon_tool_eraser.png"/>
                    </Button>
                    <Button x:Name="SelectionTool" Style="{StaticResource AppBarButtonStyle}"  Margin="0,190,0,0" AutomationProperties.Name="Copy &amp; paste" Click="clickSelectionTool">
                        <Image x:Name="SelectionToolImage" Height="25" Source="../../res/controls/icon_copy_selection.png"/>
                    </Button>
                </Grid>
            </Popup>
            <!--................. pen flyout ................. -->
            <Popup x:Name="_PenFlyout" IsLightDismissEnabled="False" IsOpen="False">
                <Popup.ChildTransitions>
                    <TransitionCollection>
                        <PopupThemeTransition />
                    </TransitionCollection>
                </Popup.ChildTransitions>
                <Grid Background="Black" Margin="0,0,0,0" Width="100" Height="340">
                    <Button x:Name="Pen5" Height="64" Width="64" BorderThickness="0" Margin="18,10,18,0" HorizontalAlignment="Center" VerticalAlignment="Top" Click="clickPen5">
                        <Image x:Name="Pen5Image" Source="../../res/controls/icon_pen_5.png" Stretch="Fill" Height="32" Width="32" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                    </Button>
                    <Button x:Name="Pen4" Height="64" Width="64" BorderThickness="0" Margin="18,74,18,0" HorizontalAlignment="Center" VerticalAlignment="Top" Click="clickPen4">
                        <Image x:Name="Pen4Image" Source="../../res/controls/icon_pen_4.png" Stretch="Fill" Height="32" Width="32" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                    </Button>
                    <Button x:Name="Pen3" Height="64" Width="64" BorderThickness="0" Margin="18,138,18,0" HorizontalAlignment="Center" VerticalAlignment="Top" Click="clickPen3">
                        <Image x:Name="Pen3Image" Source="../../res/controls/icon_pen_3.png" Stretch="Fill" Height="32" Width="32" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                    </Button>
                    <Button x:Name="Pen2" Height="64" Width="64" BorderThickness="0" Margin="18,202,18,0" HorizontalAlignment="Center" VerticalAlignment="Top" Click="clickPen2">
                        <Image x:Name="Pen2Image" Source="../../res/controls/icon_pen_2.png" Stretch="Fill" Height="32" Width="32" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                    </Button>
                    <Button x:Name="Pen1" Height="64" Width="64" BorderThickness="0" Margin="18,266,18,0" HorizontalAlignment="Center" VerticalAlignment="Top" Click="clickPen1">
                        <Image x:Name="Pen1Image" Source="../../res/controls/icon_pen_1.png" Stretch="Fill" Height="32" Width="32" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                    </Button>
                </Grid>
            </Popup>
            <!--................. color flyout ................. -->
            <Popup x:Name="_ColorFlyout" IsLightDismissEnabled="False" IsOpen="False">
                <Popup.ChildTransitions>
                    <TransitionCollection>
                        <PopupThemeTransition />
                    </TransitionCollection>
                </Popup.ChildTransitions>
                <Grid Background="Black" Margin="0,0,0,0" Width="100" Height="404">
                    <Button x:Name="BlackColor" Height="64" Width="64" BorderThickness="0" Margin="18,10,18,0" HorizontalAlignment="Center" VerticalAlignment="Top" Click="clickBlackColor">
                        <Image x:Name="BlackColorImage" Source="../../res/controls/icon_color_Black.png" Stretch="Fill" Height="32" Width="32" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                    </Button>
                    <Button x:Name="BlueColor" Height="64" Width="64" BorderThickness="0" Margin="18,74,18,0" HorizontalAlignment="Center" VerticalAlignment="Top" Click="clickBlueColor">
                        <Image x:Name="BlueColorImage" Source="../../res/controls/icon_color_Blue.png" Stretch="Fill" Height="32" Width="32" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                    </Button>
                    <Button x:Name="RedColor" Height="64" Width="64" BorderThickness="0" Margin="18,138,18,0" HorizontalAlignment="Center" VerticalAlignment="Top" Click="clickRedColor">
                        <Image x:Name="RedColorImage" Source="../../res/controls/icon_color_Red.png" Stretch="Fill" Height="32" Width="32" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                    </Button>
                    <Button x:Name="GreenColor" Height="64" Width="64" BorderThickness="0" Margin="18,202,18,0" HorizontalAlignment="Center" VerticalAlignment="Top" Click="clickGreenColor">
                        <Image x:Name="GreenColorImage" Source="../../res/controls/icon_color_Green.png" Stretch="Fill" Height="32" Width="32" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                    </Button>
                    <Button x:Name="YellowColor" Height="64" Width="64" BorderThickness="0" Margin="18,266,18,0" HorizontalAlignment="Center" VerticalAlignment="Top" Click="clickYellowColor">
                        <Image x:Name="YellowColorImage" Source="../../res/controls/icon_color_Yellow.png" Stretch="Fill" Height="32" Width="32" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                    </Button>
                    <Button x:Name="PinkColor" Height="64" Width="64" BorderThickness="0" Margin="18,330,18,0" HorizontalAlignment="Center" VerticalAlignment="Top" Click="clickPinkColor">
                        <Image x:Name="PinkColorImage" Source="../../res/controls/icon_color_Pink.png" Stretch="Fill" Height="32" Width="32" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                    </Button>
                </Grid>
            </Popup>
            <!--................. camera flyout ................. -->
            <Popup x:Name="CameraFlyout" IsLightDismissEnabled="False" IsOpen="False">
                <Popup.ChildTransitions>
                    <TransitionCollection>
                        <PopupThemeTransition />
                    </TransitionCollection>
                </Popup.ChildTransitions>
                <Grid Background="Black" Margin="0,0,0,0" Width="100" Height="200">
                    <Button x:Name="FileSystemPhoto" Style="{StaticResource AppBarButtonStyle}"  Margin="0,10,0,0" AutomationProperties.Name="Disk" Click="clickFileSystemPhoto">
                        <Image Width="25" Source="../../res/controls/icon_disk.png"/>
                    </Button>
                    <Button x:Name="CameraPhoto" Style="{StaticResource AppBarButtonStyle}"  Margin="0,100,0,0" AutomationProperties.Name="Camera" Click="clickCameraPhoto">
                        <Image Height="25" Source="../../res/controls/icon_camera.png"/>
                    </Button>
                </Grid>
            </Popup>
            <!--................. paper type flyout ................. -->
            <Popup x:Name="PaperTypeFlyout" IsLightDismissEnabled="False" IsOpen="False">
                <Popup.ChildTransitions>
                    <TransitionCollection>
                        <PopupThemeTransition />
                    </TransitionCollection>
                </Popup.ChildTransitions>
                <Grid Background="Black" Margin="0,0,0,0" Width="100" Height="370">
                    <Button x:Name="Paper0" Height="64" Width="64" BorderThickness="0" Margin="18,10,18,0" HorizontalAlignment="Center" VerticalAlignment="Top" Click="clickPaper0">
                        <Image x:Name="Paper0Image" Source="../../res/paper/paper_0_thumb.png" Stretch="Fill" Height="32" Width="32" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                    </Button>
                    <Button x:Name="Paper1" Height="64" Width="64" BorderThickness="0" Margin="18,74,18,0" HorizontalAlignment="Center" VerticalAlignment="Top" Click="clickPaper1">
                        <Image x:Name="Paper1Image" Source="../../res/paper/paper_1_thumb.png" Stretch="Fill" Height="32" Width="32" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                    </Button>
                    <Button x:Name="Paper2" Height="64" Width="64" BorderThickness="0" Margin="18,138,18,0" HorizontalAlignment="Center" VerticalAlignment="Top" Click="clickPaper2">
                        <Image x:Name="Paper2Image" Source="../../res/paper/paper_2_thumb.png" Stretch="Fill" Height="32" Width="32" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                    </Button>
                    <Button x:Name="Paper3" Height="64" Width="64" BorderThickness="0" Margin="18,202,18,0" HorizontalAlignment="Center" VerticalAlignment="Top" Click="clickPaper3">
                        <Image x:Name="Paper3Image" Source="../../res/paper/paper_3_thumb.png" Stretch="Fill" Height="32" Width="32" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                    </Button>
                    <Button x:Name="Paper4" Height="64" Width="64" BorderThickness="0" Margin="18,266,18,0" HorizontalAlignment="Center" VerticalAlignment="Top" Click="clickPaper4">
                        <Image x:Name="Paper4Image" Source="../../res/paper/paper_4_thumb.png" Stretch="Fill" Height="32" Width="32" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                    </Button>
                </Grid>
            </Popup>
        </Canvas>
        
        <!--................. app bar ................. -->
        <Page.BottomAppBar>
            <AppBar x:Name="_AppBar" Padding="10,0,10,0">
                <Grid>
                    <!--................. normal app bar ................. -->
                    <StackPanel x:Name="NormalLeftPanel" Orientation="Horizontal" Grid.Column="1" HorizontalAlignment="Left">
                        <Button x:Name="ZoomLevel" Style="{StaticResource AppBarButtonStyle}" AutomationProperties.Name="View" Click="clickZoomLevel">
                            <Image x:Name="ZoomLevelImage" Height="25" Source="../../res/controls/zoom_full.png"/>
                        </Button>
                        <Button x:Name="PenType" Style="{StaticResource AppBarButtonStyle}" AutomationProperties.Name="Tool" Click="clickPenType">
                            <Image x:Name="PenTypeImage" Height="25" Source="../../res/controls/icon_tool_pen.png"/>
                        </Button>
                        <Button x:Name="_Pen" Style="{StaticResource AppBarButtonStyle}" AutomationProperties.Name="Thickness" Click="clickPen">
                            <Image x:Name="_PenImage" Height="25" Source="../../res/controls/icon_pen_1.png"/>
                        </Button>
                        <Button x:Name="_Color" Style="{StaticResource AppBarButtonStyle}" AutomationProperties.Name="Color" Click="clickColor">
                            <Image x:Name="_ColorImage" Height="25" Source="../../res/controls/icon_black.png"/>
                        </Button>
                        <Button x:Name="Camera" Style="{StaticResource AppBarButtonStyle}" AutomationProperties.Name="Add photo" Click="clickCamera">
                            <Image x:Name="CameraImage" Height="25" Source="../../res/controls/icon_camera.png"/>
                        </Button>
                        <Image x:Name="PenTypeImageDisabled" Visibility="Collapsed" Height="25" Source="../../res/controls/icon_tool_disabled.png"/>
                        <Image x:Name="_PenImageDisabled" Visibility="Collapsed" Height="25" Source="../../res/controls/icon_thickness_disabled.png"/>
                        <Image x:Name="_ColorImageDisabled" Visibility="Collapsed" Height="25" Source="../../res/controls/icon_color_disabled.png"/>
                        <Image x:Name="CameraImageEnabled" Visibility="Collapsed" Height="25" Source="../../res/controls/icon_camera.png"/>
                        <Image x:Name="CameraImageDisabled" Visibility="Collapsed" Height="25" Source="../../res/controls/icon_camera_disabled.png"/>
                    </StackPanel>
                    <StackPanel x:Name="NormalRightPanel" Orientation="Horizontal" Grid.Column="1" HorizontalAlignment="Right">
                        <!--<Button x:Name="Undo" Style="{StaticResource UndoAppBarButtonStyle}" AutomationProperties.Name="Undo" Click="clickUndo">
                        </Button>
                        <Button x:Name="Redo" Style="{StaticResource RedoAppBarButtonStyle}" AutomationProperties.Name="Redo" Click="clickRedo">
                        </Button>-->
                        <!--<Button x:Name="_Copy" Style="{StaticResource AppBarButtonStyle}" AutomationProperties.Name="Copy page" Click="clickCopy">
                            <Image Height="25" Source="../../res/controls/icon_copy.png"/>
                        </Button>-->
                        <Button x:Name="_Add" Style="{StaticResource AddAppBarButtonStyle}" AutomationProperties.Name="Add page" Click="clickAdd">
                        </Button>
                        <Button x:Name="PaperType" Style="{StaticResource AddAppBarButtonStyle}" AutomationProperties.Name="Paper type" Click="clickPaperType">
                            <Image Height="25" x:Name="_PaperTypeImage" Source="../../res/paper/paper1_thumb.png"/>
                        </Button>
                    </StackPanel>
                    <!--................. photo app bar ................. -->
                    <StackPanel x:Name="PhotoLeftPanel" Visibility="Collapsed" Orientation="Horizontal" Grid.Column="1" HorizontalAlignment="Left">
                        <Button x:Name="DeletePhoto" Style="{StaticResource DiscardAppBarButtonStyle}" AutomationProperties.Name="Delete photo" Click="clickDeletePhoto">
                        </Button>
                        <Button x:Name="AlignPhoto" Style="{StaticResource AppBarButtonStyle}" AutomationProperties.Name="Align" Click="clickAlignPhoto">
                            <Image Height="25" Source="../../res/controls/icon_align.png"/>
                        </Button>
                        <Button x:Name="BringToFrontPhoto" Style="{StaticResource AppBarButtonStyle}" AutomationProperties.Name="Bring to front" Click="clickBringToFrontPhoto">
                            <Image Height="25" Source="../../res/controls/icon_front.png"/>
                        </Button>
                    </StackPanel>
                    <StackPanel x:Name="PhotoRightPanel" Visibility="Collapsed" Orientation="Horizontal" Grid.Column="1" HorizontalAlignment="Right">
                        <Button x:Name="OKPhoto" Style="{StaticResource YesAppBarButtonStyle}" AutomationProperties.Name="Apply" Click="clickOKPhoto">
                        </Button>
                        <Button x:Name="CancelPhoto" Style="{StaticResource DeleteAppBarButtonStyle}" AutomationProperties.Name="Cancel" Click="clickCancelPhoto">
                        </Button>
                    </StackPanel>
                    <!--................. grid app bar ................. -->
                    <StackPanel x:Name="GridLeftPanel" Visibility="Collapsed" Orientation="Horizontal" Grid.Column="1" HorizontalAlignment="Left">
                        <Button x:Name="DeletePage" Style="{StaticResource DiscardAppBarButtonStyle}" AutomationProperties.Name="Delete" Click="clickDeletePage">
                        </Button>
                    </StackPanel>
                    <StackPanel x:Name="GridRightPanel" Visibility="Collapsed" Orientation="Horizontal" Grid.Column="1" HorizontalAlignment="Right">
                        <Button x:Name="OKPage" Style="{StaticResource YesAppBarButtonStyle}" AutomationProperties.Name="Done" Click="clickOKPage">
                        </Button>
                        <!--<Button x:Name="UndoPage" Style="{StaticResource UndoAppBarButtonStyle}" AutomationProperties.Name="Undo" Click="clickUndo">
                        </Button>
                        <Button x:Name="RedoPage" Style="{StaticResource RedoAppBarButtonStyle}" AutomationProperties.Name="Redo" Click="clickRedo">
                        </Button>-->
                    </StackPanel>
                    <!--................. selection app bar ................. -->
                    <StackPanel x:Name="SelectionLeftPanel" Visibility="Collapsed" Orientation="Horizontal" Grid.Column="1" HorizontalAlignment="Left">
                        <Button x:Name="CopySelection" Style="{StaticResource AppBarButtonStyle}" AutomationProperties.Name="Copy selection" Click="clickCopySelection">
                            <Image x:Name="CopySelectionImage" Height="25" Source="../../res/controls/icon_copy_selection.png"/>
                        </Button>
                        <Image Visibility="Collapsed" x:Name="CopySelectionImageEnabled" Height="25" Source="../../res/controls/icon_copy_selection.png"/>
                        <Image Visibility="Collapsed" x:Name="CopySelectionImageDisabled" Height="25" Source="../../res/controls/icon_copy_selection_disabled.png"/>
                        <Button x:Name="_Copy" Style="{StaticResource AppBarButtonStyle}" AutomationProperties.Name="Copy full page" Click="clickCopy">
                            <Image Height="25" Source="../../res/controls/icon_copy.png"/>
                        </Button>
                        <Button x:Name="_Paste" Style="{StaticResource AppBarButtonStyle}" AutomationProperties.Name="Paste image" Click="clickPaste">
                            <Image x:Name="PasteImage" Height="25" Source="../../res/controls/icon_paste.png"/>
                        </Button>
                        <Image Visibility="Collapsed" x:Name="PasteImageEnabled" Height="25" Source="../../res/controls/icon_paste.png"/>
                        <Image Visibility="Collapsed" x:Name="PasteImageDisabled" Height="25" Source="../../res/controls/icon_paste_disabled.png"/>
                    </StackPanel>
                    <StackPanel x:Name="SelectionRightPanel" Visibility="Collapsed" Orientation="Horizontal" Grid.Column="1" HorizontalAlignment="Right">
                        <Button x:Name="OKCopy" Style="{StaticResource YesAppBarButtonStyle}" AutomationProperties.Name="Done" Click="clickOKSelection">
                        </Button>
                    </StackPanel>
                </Grid>
            </AppBar>
        </Page.BottomAppBar>
    </Page>
</SwapChainBackgroundPanel>

    